using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebFoundation;

namespace MHI.InspectionManager.Interfaces
{
	/// <summary>
	/// DevJobpersonsT,table entity:dev_jobpersons_t 
	/// </summary>
	public class DevJobpersonsT
	{
		public static readonly string KeyId;
		public static readonly string KeyUserName;
		public static readonly string KeyDepartment;
		public static readonly string KeyJobTeam;
		public static readonly string KeyGmtCreated;
		public static readonly string KeyPersonModified;
		public static readonly string KeyGmtModified;
		public static readonly string KeyStateInfo;
		public static readonly string KeyIsUse;
		public static readonly string KeyVersion;
		

		static DevJobpersonsT()
		{
			KeyId = ExpressionHelper.GetPropertyName<DevJobpersonsT>(r => r.Id);
			KeyUserName = ExpressionHelper.GetPropertyName<DevJobpersonsT>(r => r.UserName);
			KeyDepartment = ExpressionHelper.GetPropertyName<DevJobpersonsT>(r => r.Department);
			KeyJobTeam = ExpressionHelper.GetPropertyName<DevJobpersonsT>(r => r.JobTeam);
			KeyGmtCreated = ExpressionHelper.GetPropertyName<DevJobpersonsT>(r => r.GmtCreated);
			KeyPersonModified = ExpressionHelper.GetPropertyName<DevJobpersonsT>(r => r.PersonModified);
			KeyGmtModified = ExpressionHelper.GetPropertyName<DevJobpersonsT>(r => r.GmtModified);
			KeyStateInfo = ExpressionHelper.GetPropertyName<DevJobpersonsT>(r => r.StateInfo);
			KeyIsUse = ExpressionHelper.GetPropertyName<DevJobpersonsT>(r => r.IsUse);
			KeyVersion = ExpressionHelper.GetPropertyName<DevJobpersonsT>(r => r.Version);
		}
		

		private long _id; 
		private string _userName; 
		private string _department; 
		private long? _jobTeam; 
		private DateTime? _gmtCreated; 
		private string _personModified; 
		private DateTime? _gmtModified; 
		private float? _stateInfo; 
		private int _isUse; 
		private long _version; 
		

		/// <summary>
		///  Id, column: id required
		/// </summary>
		[DisplayName("编码")]
		[Required]
		public long Id
		{
			get{ return _id; }
			set
			{
				if(_id != value)
				{
					_id = value;
					NotifyOfChange(KeyId);
				}
			}
		}

		/// <summary>
		///  UserName, column: user_name 
		/// </summary>
		[DisplayName("@desc 人员")]
		public string UserName
		{
			get{ return _userName; }
			set
			{
				if(_userName != value)
				{
					_userName = value;
					NotifyOfChange(KeyUserName);
				}
			}
		}

		/// <summary>
		///  Department, column: department 
		/// </summary>
		[DisplayName("@desc 部门")]
		public string Department
		{
			get{ return _department; }
			set
			{
				if(_department != value)
				{
					_department = value;
					NotifyOfChange(KeyDepartment);
				}
			}
		}

		/// <summary>
		///  JobTeam, column: job_team 
		/// </summary>
		[DisplayName("@desc 班组Id")]
		public long? JobTeam
		{
			get{ return _jobTeam; }
			set
			{
				if(_jobTeam != value)
				{
					_jobTeam = value;
					NotifyOfChange(KeyJobTeam);
				}
			}
		}

		/// <summary>
		///  GmtCreated, column: gmt_created 
		/// </summary>
		[DisplayName("@desc 创建时间")]
		public DateTime? GmtCreated
		{
			get{ return _gmtCreated; }
			set
			{
				if(_gmtCreated != value)
				{
					_gmtCreated = value;
					NotifyOfChange(KeyGmtCreated);
				}
			}
		}

		/// <summary>
		///  PersonModified, column: person_modified 
		/// </summary>
		[DisplayName("@desc 更新人")]
		public string PersonModified
		{
			get{ return _personModified; }
			set
			{
				if(_personModified != value)
				{
					_personModified = value;
					NotifyOfChange(KeyPersonModified);
				}
			}
		}

		/// <summary>
		///  GmtModified, column: gmt_modified 
		/// </summary>
		[DisplayName("@desc 更新时间")]
		public DateTime? GmtModified
		{
			get{ return _gmtModified; }
			set
			{
				if(_gmtModified != value)
				{
					_gmtModified = value;
					NotifyOfChange(KeyGmtModified);
				}
			}
		}

		/// <summary>
		///  StateInfo, column: state_info 
		/// </summary>
		[DisplayName("标识状态")]
		public float? StateInfo
		{
			get{ return _stateInfo; }
			set
			{
				if(_stateInfo != value)
				{
					_stateInfo = value;
					NotifyOfChange(KeyStateInfo);
				}
			}
		}

		/// <summary>
		///  IsUse, column: is_use 
		/// </summary>
		[DisplayName("是否可用")]
		[Required]
		public int IsUse
		{
			get{ return _isUse; }
			set
			{
				if(_isUse != value)
				{
					_isUse = value;
					NotifyOfChange(KeyIsUse);
				}
			}
		}

		/// <summary>
		///  Version, column: version 
		/// </summary>
		[DisplayName("版本")]
		[Required]
		public long Version
		{
			get{ return _version; }
			set
			{
				if(_version != value)
				{
					_version = value;
					NotifyOfChange(KeyVersion);
				}
			}
		}

		public event PropertyChangedEventHandler PropertyChanged;

		private void NotifyOfChange(string propertyName)
		{
			if (this.PropertyChanged != null)
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
}
